<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%@ include file="/WEB-INF/component/commonTagLib.jsp"%>
<!DOCTYPE html>
<html>
<head>
	<title><spring:message code="message.lable.YiPingJiaDingDan"/></title>
	<%@ include file="/WEB-INF/component/commonCSS.jsp"%>
    <!--[if lt IE 9]>
        <script src="lib/js/html5shiv.min.js"></script>
        <script src="lib/js/respond.min.js"></script>
    <![endif]-->
</head>
<body class="skin-blue-light sidebar-mini fixed skin-blue-light-frame">
    <section class="content-header">
        <h1><spring:message code="message.lable.YiPingJiaDingDan"/></h1>
        <ol class="breadcrumb">
        	<li><a href="${ctx}/home.jsp"><i class="fa fa-home"></i><spring:message code="message.lable.first"/></a></li>
            <li><a href="#"><spring:message code="message.lable.CaiGouManage"/></a></li>
            <li class="active"><a href="#"><spring:message code="message.lable.DingDanPinJia"/></a></li>
            <li class="active"><a href="#"><spring:message code="message.lable.YiPingJiaDingDan"/></a></li>
        </ol>
    </section>
 
    <section class="content">
        <div class="box box-success">
            <div class="box-body">
                <form id="form">
                	<div class="input" style="margin-top:-5px">
						<div class="textalign1"><spring:message code="message.listForm.DingDanBaoHao"/><spring:message code="message.yanZheng.maoHao"/></div>
							<div class="boxinput">
	                    	<input type="text" class="textinput"  id="interflowId" name="interflowId" placeholder="<spring:message code="message.listForm.DingDanBaoHao"/>"/> 
	                    	</div>
	                    <div class="textalign"><spring:message code="message.listForm.PeiSongQiYe"/><spring:message code="message.yanZheng.maoHao"/></div>
							<div class="boxinput">
	                    	<input type="text" class="textinput"  id="delCompName" name="delCompName" placeholder="<spring:message code="message.listForm.PeiSongQiYe"/>"/> 
	                    	</div>
	                    <div class="textalign"><spring:message code="message.listForm.KaiShiRiQi"/><spring:message code="message.yanZheng.maoHao"/></div>
	                 <div class="boxinput"> 
                       <table style="width:100%">
                                <tr>
                                    <td style="width:50%">
                                        <input id="startDate" name="startDate" type="text" class="textinput"   placeholder="yyyy-MM-dd" 
                            data-date-fmt="yyyy-MM-dd" onFocus="WdatePicker({maxDate:'#F{$dp.$D(\'endDate\')}'})" />
                                    </td>
                                    <td>&nbsp;-&nbsp;</td>
                                    <td style="width:50%">
                                        <input id="endDate" name="endDate" type="text" class="textinput" placeholder="yyyy-MM-dd" 
                            data-date-fmt="yyyy-MM-dd" onFocus="WdatePicker({minDate:'#F{$dp.$D(\'startDate\')}'})" />
                                    </td>
                                </tr>
                            </table>
                     </div>
	             	</div>
	              <div class="input" style="margin-top:-5px">
		              <div class="textalign1"><spring:message code="message.listForm.SongDaRiQi"/><spring:message code="message.yanZheng.maoHao"/></div>
		                 <div class="boxinput"> 
	                       <table style="width:100%">
	                                <tr>
	                                    <td style="width:50%">
	                                        <input id="recpStartDate" name="recpStartDate" type="text" class="textinput"   placeholder="yyyy-MM-dd" 
	                            data-date-fmt="yyyy-MM-dd" onFocus="WdatePicker({maxDate:'#F{$dp.$D(\'recpEndDate\')}'})" />
	                                    </td>
	                                    <td>&nbsp;-&nbsp;</td>
	                                    <td style="width:50%">
	                                        <input id="recpEndDate" name="recpEndDate" type="text" class="textinput" placeholder="yyyy-MM-dd" 
	                            data-date-fmt="yyyy-MM-dd" onFocus="WdatePicker({minDate:'#F{$dp.$D(\'recpStartDate\')}'})" />
	                                    </td>
	                                </tr>
	                            </table>
	                     </div>
                    <div class="textalign" >
					<button type="button" onclick="gridSerch();" class="btn btn-success btn-sm"id="selectDicCompType"><spring:message code="message.button.seachSpacing"/></button>
                </div>
            </div>
            </form>
        </div>
        </div>


        <table class="jqgrid" id="gridlist"></table>
        <div id="gridpage"></div>
        <!-- <div class=" box box-warning bottongroup">
        </div> -->
    </section>
    <%@ include file="/WEB-INF/component/commonJS.jsp"%>
    <script type="text/javascript">
    //绑定回车
    $('#interflowId,#delCompName,#startDate,#endDate,#recpStartDate,#recpEndDate').bind('keydown', function(event) { 
        if (event.keyCode == "13") {
            $('#selectDicCompType').click();
        }
    });	
    $("#interflowId").focus();//加载页面光标在第一个查询框内 
    
    
    
        $(function () {
            var postJson = formatForm("form");
            $("#gridlist").jqGrid({
            	url: "${ctx}/purOrderInfo/getReviewsDataList.html",
                mtype: "POST",
                datatype: "json",
                postData: postJson,
                autowidth: true,
                shrinkToFit: false,
                height: 320,
                colNames: [
                           '<spring:message code="message.jqGrid.cz"/>',
                           '<spring:message code="message.listForm.DingDanBaoHao"/>',
                           '<spring:message code="message.listForm.SuiHuoDanHao"/>',
                           '<spring:message code="message.listForm.PeiSongQiYe"/>',
                           '<spring:message code="message.listForm.PingFen"/>',
                           '<spring:message code="message.listForm.PingFenBeiZhu"/>',
                           '<spring:message code="message.listForm.PingFenShiJian"/>',
                           '<spring:message code="message.listForm.CaiGouTiaoMuShu"/>',
                           '<spring:message code="message.listForm.PeiSongTiaoMuShu"/>',
                           '<spring:message code="message.listForm.DaoHuoTiaoMuShu"/>', 
                           '<spring:message code="message.listForm.DingDanKaiShiShiJian"/>',
                           '<spring:message code="message.listForm.DingDanQueRenShiJian"/>',
                           '<spring:message code="message.listForm.DingDanChuKuShiJian"/>',
                           '<spring:message code="message.listForm.DingDanDaoDaShiJian"/>'
                           ],
                colModel: [
                    { name: 'oper', width: 50 , align:"center" ,sortable: false,
                              formatter : function(val, opts, rowdata) {
                                var str =  "<a href='toReviewsListDetail.html?interflowId=" + rowdata.interflowId + "' style='background:url(${ctx}/lib/img/icon/icon.png) no-repeat -100px 0px' class='opIcon' title='<spring:message code="message.jqGrid.cz.xiangQing"/>'></a>";
                              return str;
                    }},
					{ name: 'interflowId', width: 210 , align:"center" ,sortable: false},
					{ name: 'withOrderId', width: 210 , align:"center" ,sortable: false},
					{ name: 'delCompName', width: 190 , align:"center" ,sortable: false,
						 formatter:function(cellvalue, options,row) {
							 return "<a href=\"javascript:$.HN.dialog.opendialog('"+row.delCompId+"','"+cellvalue+"','${ctx}/stdCompinfo/toStdCompinfoDetail.html?compId="+row.delCompId+"','800px','400px',function operResult(val){return operResult;})\">"+cellvalue+"</a>";
			     		}},
					{ name: 'gradeScore', width: 80 , align:"center" ,sortable: false},
					{ name: 'gradeRemark', width: 80 , align:"center" ,sortable: false},
					{ name: 'gradeDatetime', width: 140 , align:"center" ,sortable: false},
					{ name: 'proCount', width: 80 , align:"center" ,sortable: false},
					{ name: 'delCount', width: 80 , align:"center" ,sortable: false},
					{ name: 'recpCount', width: 80 , align:"center" ,sortable: false},
					{ name: 'orderBegTime', width: 140 , align:"center" ,sortable: false},
					{ name: 'submitDatetime', width: 140 , align:"center" ,sortable: false},
					{ name: 'delDatetime', width: 140 , align:"center" ,sortable: false},
					{ name: 'recpDatetime', width: 140 , align:"center" ,sortable: false}
					
					
                ],
                rowNum: 20,
                rowList: [10, 20, 50, 100],
                rownumbers: true,
                pager: "#gridpage",
                //multiselect: true, 
                viewrecords: true,
                gridComplete: function(){
               	 //序号列宽度自适应（参数为jqgridID）
                      autoRNWidth("gridlist");
                  	//数据只有一条时默认选中（参数为jqgridID）
                      selectByOneData("gridlist");
                },
                caption: "<spring:message code="message.list.DingDanLieBiao"/>",
                jsonReader: {
                    repeatitems: false,
                    id: "ids"
                }
            });
            $("#gridlist").jqGrid('navGrid', '#gridpage', { add: false, edit: false, del: false, search: false, refresh: false });
            $(window).trigger("resize");
        });
        
        
        
        
        
        //查询
        function gridSerch() {
        	var startDate = $.trim($("#startDate").val());
        	var endDate = $.trim($("#endDate").val());
        	var recpStartDate = $.trim($("#recpStartDate").val());
        	var recpEndDate = $.trim($("#recpEndDate").val());
        	var interflowId = $.trim($("#interflowId").val());
        	var delCompName = $.trim($("#delCompName").val());
    		$("#gridlist").jqGrid('setGridParam',{  
    	        datatype:'json',
    	        postData:{
    	        		"startDate":startDate,
    	        		"endDate":endDate,
    	        		"recpStartDate":recpStartDate,
    	        		"recpEndDate":recpEndDate,
    	        	    "interflowId":interflowId,
    	        		"delCompName":delCompName},
    	        		page:1
    	    }).trigger("reloadGrid"); //重新载入  
    	}
        
	      
	      
	      
    </script>
</body>
</html>